import time,unittest
from selenium import webdriver


class Log_h(unittest.TestCase):
    def test_login(self):
        dr= webdriver.Chrome()
        dr.get("http://192.168.1.106:8080/WoniuBoss2.5/")
        dr.find_element_by_class_name("text").send_keys("WNCD000")
        dr.find_element_by_xpath("//*[@id='loginForm']/div/div[2]/input").send_keys("woniu123")
        # dr.find_element_by_class_name("checkcode").send_keys("0000")
        time.sleep(2)
        dr.find_element_by_xpath("//*[@id='form-login']/div/div/div[2]/button").click()

        act=dr.find_element_by_xpath("/html/body/div[2]/div[2]/ul/li[2]/a").text
        # print(act)
        exp="注销"
        self.assertEqual(exp,act)



        # dr.find_element_by_xpath("//div[@id='nav2']/a[5]").click()
        # time.sleep(9)
        # exp=dr.find_element_by_class_name("head").text
        # print(exp)
        return dr



if __name__ == '__main__':
    Log_h().test_login()